import { Body, Controller, Get, Post, Req, Res } from '@nestjs/common'
import { DailyService } from './daily.service'
import { Request, Response } from 'express'
@Controller('daily')
export class DailyController {
  constructor(private readonly DailyService: DailyService) {}
  @Get()
  async getDailyData(@Req() req:Request,@Res() res:Response){
    return this.DailyService.getDailyDate(req,res)
  }
  @Post("search")
  searchDailyData(@Req() req:Request, @Res() res:Response){
    return this.DailyService.searchDailyData(req,res)
  }

  @Post("add")
  async add(@Body() body:any){
    return this.DailyService.addDailyData(body)
  }
 
}
